package cn.rongdao.jrkabao.ui.cashcoupon.uicomponent;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;

import cn.rongdao.jrkabao.R;
import cn.rongdao.jrkabao.bean.cashcoupon.GetCashCouponBean;

/**
 * Created by jack on 2017/8/14
 */

public class MyCashCouponUIComponent extends RelativeLayout {
    public MyCashCouponUIComponent(Context context) {
        super(context);
    }

    public MyCashCouponUIComponent(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyCashCouponUIComponent(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    private CashCouponUIComponent cashCouponUIComponent;

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        cashCouponUIComponent = (CashCouponUIComponent) findViewById(R.id.imcc_ll_cash_coupon);
    }

    public void setContent(boolean isUnUse, boolean isInValid, GetCashCouponBean data) {
        setVisibility(View.VISIBLE);
        cashCouponUIComponent.setContent(isUnUse, isInValid, data);
    }
}